package com.his.his_system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;

import lombok.Data;

/**
 * 检查项目费用表
 *
 * @TableName dzm_his_inspectionfee
 */
@TableName(value = "dzm_his_inspectionfee")
@Data
public class DzmHisInspectionfee implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Object insId;

    /**
     * 添加用户id
     */
    private Integer mid;

    /**
     * 医院id
     */
    private Integer hid;

    /**
     * 项目名称
     */
    private String inspectionName;

    /**
     * 项目类别
     */
    private String clas;

    /**
     * 项目单价
     */
    private BigDecimal unitPrice;

    /**
     * 项目成本
     */
    private BigDecimal cost;

    /**
     * 创建时间
     */
    private Integer createTime;

    /**
     * 修改时间
     */
    private Integer updateTime;

    /**
     * 单位
     */
    private String unit;

    /**
     * 类别id
     */
    private Integer classId;

    @TableField(exist = false)
    private String hospitalName;

    @TableField(exist = false)
    private String member;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DzmHisInspectionfee other = (DzmHisInspectionfee) that;
        return (this.getInsId() == null ? other.getInsId() == null : this.getInsId().equals(other.getInsId()))
                && (this.getMid() == null ? other.getMid() == null : this.getMid().equals(other.getMid()))
                && (this.getHid() == null ? other.getHid() == null : this.getHid().equals(other.getHid()))
                && (this.getInspectionName() == null ? other.getInspectionName() == null : this.getInspectionName().equals(other.getInspectionName()))
                && (this.getClas() == null ? other.getClas() == null : this.getClas().equals(other.getClas()))
                && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
                && (this.getCost() == null ? other.getCost() == null : this.getCost().equals(other.getCost()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
                && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInsId() == null) ? 0 : getInsId().hashCode());
        result = prime * result + ((getMid() == null) ? 0 : getMid().hashCode());
        result = prime * result + ((getHid() == null) ? 0 : getHid().hashCode());
        result = prime * result + ((getInspectionName() == null) ? 0 : getInspectionName().hashCode());
        result = prime * result + ((getClas() == null) ? 0 : getClas().hashCode());
        result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
        result = prime * result + ((getCost() == null) ? 0 : getCost().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", insId=").append(insId);
        sb.append(", mid=").append(mid);
        sb.append(", hid=").append(hid);
        sb.append(", inspectionName=").append(inspectionName);
        sb.append(", clas=").append(clas);
        sb.append(", unitPrice=").append(unitPrice);
        sb.append(", cost=").append(cost);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", unit=").append(unit);
        sb.append(", classId=").append(classId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}